# 安装docker,一键部署docker环境
echo "正在安装docker"
echo "没有安装docker,启动docker安装流程"
curl -sSL https://get.daocloud.io/docker | sh
echo "正在设置docker仓库源以及本地云仓库"
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
    "registry-mirrors": ["https://lzr7u24g.mirror.aliyuncs.com"],
    "insecure-registries": ["202.116.161.93:5000","172.26.14.30:5000"],
    "bip": "193.169.99.1/24",
    "default-address-pools":[{
        "base": "10.10.10.0/16",
        "size":24
    }],
    "dns":[
        "114.114.114.114",
        "202.116.160.32"
    ]
} 
EOF
echo "docker setting success"
echo "正在启动docker"
sudo systemctl daemon-reload
sudo systemctl restart docker
sudo systemctl enable docker



